package com.ibeeking.found.common.enums;

/**
 * @Author ibeeking
 * @Date 2021/7/5 10:46
 * @Version 1.0
 * @Description 订单类型描述 1 线上正常订单 2 消费补录订单
 */
public enum OrdeTypeEnum {
    WECHATPAY(0,"正常订单"),
    CouponPAY(1,"消费补录订单"),
    DEL(2,"删除订单"),
    ;

    private Integer code;
    private String value;

    OrdeTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(Integer code) {
        for (OrdeTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
